package com.gmt.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author John.zhang
 * @version Id: FilterA, v 1.0 2020/11/11 19:40 ZhiYong Exp $
 */
@WebFilter(urlPatterns = "/filterA")
public class FilterA implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("before FilterA");
        filterChain.doFilter(servletRequest,servletResponse);
        System.out.println("after FilterA");
    }

    @Override
    public void destroy() {

    }
}
